package com.donglan.pethome.product.domain;


import com.donglan.pethome.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;


/**
 * @Author: zhangdonghui
 * @Date: 2022/2/8 10:26
 */
@Data
public class Product extends BaseDomain {
    //服务名
    private String name;
    //服务图片
    private String resources;
    //售价，金额方面建议使用BigDecimal
    private BigDecimal saleprice;
    //下架时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date offsaletime = new Date();
    //上架时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date onsaletime;
    //0 下架  1 上架，默认是下架状态，因为还需要进行审核等
    private Integer state = 0;
    //成本价
    private BigDecimal costprice;
    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createtime = new Date();
    //销量
    private Integer salecount = 0;
    //服务详情
    private ProductDetail productDetail;


}
